@import './base.css';

#app {
  font-weight: normal;
  padding: 0;
  height: 100vh;
  width: 100%;
  min-width: 720px;
  margin: auto;
}

a,
.green {
  text-decoration: none;
  color: hsla(160, 100%, 37%, 1);
  transition: 0.4s;
  padding: 3px;
}

@media (hover: hover) {
  a:hover {
    background-color: hsla(160, 100%, 37%, 0.2);
  }
}

body {
  display: flex;
  place-items: center;
}


.image-slot {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  background: var(--el-fill-color-light);
  color: var(--el-text-color-secondary);
  font-size: 30px;
}

.pointer {
  cursor: pointer;
}

.clear-float {
  clear: both;
}

.clear-float-after {
  &::after {
    display: block;
    content: '';
    clear: both;
  }
}

.float-left {
  float: left;
}

.float-right {
  float: right;
}

.text-center {
  text-align: center !important;
}

.text-left {
  text-align: left !important;
}

.text-right {
  text-align: right !important;
}

.flex {
  display: flex;

  &-warp {
    flex-wrap: wrap;
  }

  &-no-warp {
    flex-wrap: nowrap;
  }

  &.justify-content-left {
    justify-content: left;
  }

  &.justify-content-center {
    justify-content: center;
  }

  &.justify-content-between {
    justify-content: space-between;
  }

  &.justify-content-right {
    justify-content: right;
  }


  &.align-items-start {
    align-items: start;
  }

  &.align-items-center {
    align-items: center;
  }

  &.align-items-end {
    align-items: end;
  }

  &.align-content-start {
    align-content: start;
  }

  &.align-content-center {
    align-content: center;
  }

  &.align-content-end {
    align-content: end;
  }
}

.text-ellipsis {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

$total-w: 50;
@for $i from 1 through $total-w {
  $w: $i * 10;
  .w-#{$w} {
    width: #{$w}px !important;
  }
  .h-#{$w} {
    height: #{$w}px !important;
  }
  .gap-#{$w} {
    gap: #{$w}px !important;
  }
}

.border-radius-m {
  border-radius: 2px;
}

.border-radius-xs {
  border-radius: 3px;
}

.border-radius-s {
  border-radius: 4px;
}

.border-radius {
  border-radius: 5px;
}

.border-radius-l {
  border-radius: 6px;
}

.border-radius-xl {
  border-radius: 8px;
}

.border-radius-2xl {
  border-radius: 10px;
}

.border-radius-3xl {
  border-radius: 14px;
}

$total-pr: 10;
@for $i from 1 through $total-pr {
  $pr: $i * 10;
  .pw-#{$pr} {
    width: #{$pr}#{'%'} !important;
  }
  .ph-#{$pr} {
    height: #{$pr}#{'%'} !important;
  }
  .vw-#{$pr} {
    height: #{$pr}vw !important;
  }
  .vh-#{$pr} {
    height: #{$pr}vh !important;
  }
}

$total-pad: 30;
@for $p from 1 through $total-pad {
  .padding-#{$p} {
    padding: #{$p}px;
  }

  .padding-tb-#{$p} {
    padding-top: #{$p}px;
    padding-bottom: #{$p}px;
  }

  .padding-lr-#{$p} {
    padding-left: #{$p}px;
    padding-right: #{$p}px;
  }

  .padding-top-#{$p} {
    padding-top: #{$p}px;
  }

  .padding-right-#{$p} {
    padding-left: #{$p}px;
  }

  .padding-bottom-#{$p} {
    padding-bottom: #{$p}px;
  }

  .padding-left-#{$p} {
    padding-left: #{$p}px;
  }

  .margin-#{$p} {
    margin: #{$p}px;
  }

  .margin-top-#{$p} {
    margin-top: #{$p}px;
  }

  .margin-right-#{$p} {
    margin-right: #{$p}px;
  }

  .margin-bottom-#{$p} {
    margin-bottom: #{$p}px;
  }

  .margin-left-#{$p} {
    margin-left: #{$p}px;
  }
}

.font-size-m {
  font-size: 10px !important;
}

.font-size-xs {
  font-size: 12px !important;;
}

.font-size-s {
  font-size: 13px !important;;
}

.font-size {
  font-size: 14px !important;;
}

.font-size-l {
  font-size: 16px !important;;
}

.font-size-xl {
  font-size: 18px !important;;
}

.font-size-2xl {
  font-size: 20px !important;;
}

.font-size-3xl {
  font-size: 23px !important;
}

.font-size-4xl {
  font-size: 28px !important;
}

.font-bold {
  font-weight: bold;
}

.font-normal {
  font-weight: normal;
}

.line-height {
  line-height: 1;
}

.line-height-l {
 line-height: 1.2;
}

.line-height-xl {
  line-height: 1.5;
}

.line-height-2xl {
  line-height: 2;
}

.line-height-3xl {
  line-height: 3;
}

.dark {
  .el-button {
    opacity: 0.7;
  }
}

html.dark {

  .message-reply {
    .whitespace-pre-wrap {
      white-space: pre-wrap;
      color: var(--n-text-color);
    }
  }

  .highlight pre,
  pre {
    background-color: #282c34;
  }
}

.code-block-header {
  float: right;
  height: 20px;
  position: absolute;
  top: -20px;
  padding: 0;
}

.code-block-wrapper {
  padding-top: 0;
}

.hljs.code-block-body {
  margin-top: -44px
}

.markdown-body {
  background-color: transparent;
  font-size: 14px;
  overflow: hidden;

  p {
    white-space: pre-wrap;
  }

  ol {
    list-style-type: decimal;
  }

  ul {
    list-style-type: disc;
  }

  code {
    background: var(--el-bg-color-overlay);
    padding: 2px 6px;
    border-radius: 4px;

  }

  pre code,
  pre tt {
    line-height: 1.65;
    display: block;
    padding: 0 15px;
    white-space: pre-wrap;
  }

  .highlight pre,
  pre {
    background-color: #fff;
  }

  code.hljs {
    padding: 0;
    background: transparent;
  }

  code[class^=language-] {
    padding: 0 20px;
    margin: 10px 0;
    background: transparent;
  }

  .code-block {
    &-wrapper {
      position: relative;
      padding-top: 24px;
    }

    &-header {
      position: absolute;
      top: 5px;
      right: 0;
      width: 100%;
      padding: 0 1rem;
      display: flex;
      justify-content: flex-end;
      align-items: center;
      color: #b3b3b3;

      &__copy {
        cursor: pointer;
        margin-left: 0.5rem;
        user-select: none;

        &:hover {
          color: #65a665;
        }
      }
    }
  }


  .code-block-header {
    float: right;
    height: 20px;
    position: absolute;
    top: -20px;
    padding: 0;
  }

  .code-block-wrapper {
    padding-top: 0;
  }

  .hljs.code-block-body {
    margin-top: -44px
  }
}

.el-dialog__headerbtn .el-dialog__close {
	font-size: 26px !important;
}

.multi-line-text {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  &.line-clamp-2 {
  -webkit-line-clamp: 2;
  }
  &.line-clamp-3 {
  -webkit-line-clamp: 3;
  }
  &.line-clamp-4 {
  -webkit-line-clamp: 4;
  }
  &.line-clamp-5 {
  -webkit-line-clamp: 5;
  }
}

.el-popper .el-popover__title {
  text-align: center;
  line-height: 2;
}

.el-dialog {
  margin-bottom: 0 !important;
}

.el-button.is-text:hover {
  background-color: transparent !important;
}

.el-drawer__header {
  margin-bottom: 5px !important;
}